#ifndef MEMSTATS_H
#define MEMSTATS_H



/**
 * Global stats.
 */
#include <linux.h> 

#include <pthread.h>

typedef struct  {
    pthread_mutex_t mutex;
    uint32_t  curr_items;
    uint32_t  total_items;
    uint64_t      curr_bytes;
    uint32_t  curr_conns;
    uint32_t  total_conns;
    uint32_t  conn_structs;
    uint64_t      get_cmds;
    uint64_t      set_cmds;
    uint64_t      get_hits;
    uint64_t      get_misses;
    uint64_t      evictions;
    uint64_t      reclaimed;
    time_t        started;          /* when the process was started */
    bool          accepting_conns;  /* whether we are currently accepting */
    uint64_t      listen_disabled_num;
}stats;

void STATS_LOCK();

void STATS_UNLOCK();
#endif
